
//获取到秒针的dom结构
const secondHand=document.querySelector('.second-hand')
const minHand=document.querySelector('.min-hand')
const hourHand=document.querySelector('.hour-hand')
// console.log(secondHand);
function setDate() {
    const now=new Date()

// 获取当前的秒
const seconds=now.getSeconds()
 const secondsDegrees=(seconds/60)*360+90
 console.log(secondsDegrees);
 secondHand.style.transform=`rotate(${secondsDegrees}deg)`
}
setInterval(setDate,1000)//每隔一秒钟调用一次

setDate()
